script fixes