fix bug in testscript.py