Fix bug in test script.