fix for the issue with popover destroy