fix unregister events