fix a bug in script.py