Fix a generation bug