Fixed flicker bug