fix flicker