fixed bug in test.py