Fixed problem when changing an event.