Fixes to test script