more script fixes