fixed generate.sh