addition to .js file to fix popover issues