Fixed a dereferencing bug in the exception handler.