fixed the flicker