Fixed a few glitches and error messages