Another stab at fixing  BeforeLoadScriptFailed