Fix remote script tests