minor script fixes