Fixed three glitches