fixing glitches