Fix unhandled exception event handler assignment