Fix a couple regressions in exception handling