Fixing a bug in test script