fixes flicker glitch