Fixed a few bugs reported on the forums