Fixed most glitches.