Small script fixes