Fixed issue where an exception showed a null object.