Fixed a bug where unregistering events didn't work