Fixes some errors with exceptions