further script fixes