Fix a bug in GlobalScript.