Fixed a shadow flickering bug