fixes modal and popover bug