added correct popover handling