Fix unhandled exception dialog being shown when refresh web reference fails.