fix visual glitches