fixed bug in test script