fixing event gen bug