More script fixes