Fix a problem in ScriptFormat