Fixed test-gen.py