better handling for Chrome popups