Fix event unregistration to properly remove the Dispatcher.