Fixed an issue with unregistering events.