                 for (_, dayViewCell) in self.dayViewCells where !sortedChangedDays.contains(dayViewCell.date) {
                     dayViewCell.setNeedsLayout()
                 }
+
+                // If an attempt was made to overwrite events while the above process was running
+                // this if-check will notice this and recall overwriteAllEvents
+                if let overwriteTempData = self.eptTempData {
+                    self.overwriteAllEvents(withData: overwriteTempData)
+                }
             }
         }
     }

    }

    /**
    Sets the horizontal padding of the text within event labels.
     */
    func setEventLabelHorizontalTextPadding(to padding: CGFloat) {
        TextVariables.eventLabelHorizontalTextPadding = padding

    private var yearToday: Int = DayDate.today.year
    // Current period
    private var currentPeriod: Period = Period(ofDate: DayDate.today)
    // Bool stores if the Event Processing Thread (ept) is running
    private var eptRunning: Bool = false
    // Stores temp data that was attempted to be set while Event Processing Thread was running
    private var eptTempData: [EventData]?
    // Bool stores is view is scrolling to a specific day
    private var scrollingToDay: Bool = false
    // Previous zoom scale of content
    private var previousZoomTouch: CGPoint?
    // Current zoom scale of content
