Fixed a few glitches