a few exceptions and fixes