Fixed a few small glitches