fix crash when using findEventById
fix modifyEvent crash