Some changes to the exception handler.