Fixed some popover bugs