Did you make a clean flash or dirty flash?
A clean flash is wiping off the system partition of the phone, and the dirty flash is installing the update over the existing system partition.
With the custom recovery you can make the clean flash process simple.
Please try to do the clean flash to fix your phone's problem.