Fixed command termination in generate.sh