Unregister from events when panel is closed for efficiency