fixes error issues and other minor issues
Merge pull request #10 from adept-dm/issues-7-8

fixes error reporting issues #7 and #8