fix bug in test script