FIX: Proper detecting of hiding popover