Minor script fixes