Fixed the glitches