Fix generate.sh