fixed generate next event