Fix test scripts