Fix for the JS modal and popover