removed asserts and replaced with error messages
Merge pull request #1117 from ZappoMan/bugfixes

removed asserts and replaced with error messages