Modifications to ScriptManager