add proper closing logic that will work even though an event is cancelled.