Fix to test scripts