fix graphical glitches