Fix test script mode.