exception fixes
Merge pull request #4 from rtf-const/master

Some exception fixes