fixed minor bug in test script