Fixes to test scripts