Fix more script issues