fixing flicker