Another correction to generate_events