Fix to the exception handling code.