unregistering events when disabled