fixes a crash problem that cast WebView