Fix popover not auto-closing