Improve popover menu closing