Fix crash when cancelling popup before the webview has loaded