fix a bug of getEvent.