Fixes to exceptions
Misc Bug fixes