Fixed bug in test script