minor edits to popover code