Further script fixes