improve ScriptStartup extension method.