fix script syntax errors