trying to fix flicker