fix: unregister event handlers when closing popover