Fix on creating and updating events.