Fixed the popover bug