Fixed a few exceptions