bug fix in the Event API