Fix graphics glitches