Fix calendar events deleted randomly when refreshed