bug fix for test.py