Fixed codegen bug with exception handler and return