                     }
                 }
                 
+                // Set layoutNeedsUpdating to false
+                self.layoutNeedsUpdating = false
             })
         } else {
             (calendarView.collectionViewLayout as! JTAppleCalendarLayoutProtocol).clearCache()

    
    // Keeps track of item size for a section. This is an optimization
    var scrollInProgress = false
    
    private var layoutNeedsUpdating = false
    /// Number of rows to be displayed per month. Allowed values are 1, 2, 3 & 6.
    /// After changing this value, you should reload your calendarView to show your change
    public var numberOfRowsPerMonth: Int {

        theSelectedIndexPaths.removeAll()
        let layout = calendarView.collectionViewLayout as! JTAppleCalendarLayoutProtocol
        layout.clearCache()
        monthInfo = setupMonthInfoDataForStartAndEndDate()
        self.calendarView.reloadData()
    }
    
    func calendarViewHeaderSizeForSection(section: Int) -> CGSize {
