Fixed flickering bug