Updating popover code to find a bug