fix some errors in script
