error in generate events corrected