Fix bug with showing of popover