                 if isScrollingForward() {
                     sectionSize = calendarLayout.sectionSize[currentScrollSection]
                     calculatedOffSet = sectionSize
-                } else if isScrollingBackward() {
+                } else {
                     if currentScrollSection - 1  >= 0 {
                         calculatedOffSet = calendarLayout.sectionSize[currentScrollSection - 1]
                     }

        let calculatedCurrentFixedContentOffsetFrom = {(interval: CGFloat)->CGFloat in
            if isScrollingForward() {
                return ceil(contentOffset / interval) * interval
            } else if isScrollingBackward(){
                return floor(contentOffset / interval) * interval
            }
            return contentOffset
        }
        
        
        
        
        switch scrollingMode {

                
                setTargetContentOffset(calculatedOffSet)
            case let .NonStopToCell(resistance):
                var interval = calendarLayout.cellCache[targetSection]![0].frame.width
                let diffResistance = diff * resistance
                
                
                if direction == .Horizontal {
                    if isScrollingForward() {
                        let recalcOffsetAfterResistanceApplied = theTargetContentOffset - diffResistance
                        calculatedOffSet = ceil(recalcOffsetAfterResistanceApplied / interval) * interval
                    } else if isScrollingBackward() {
                        let recalcOffsetAfterResistanceApplied = theTargetContentOffset + diffResistance
                        calculatedOffSet = floor(recalcOffsetAfterResistanceApplied / interval) * interval
                    }
                } else {
                    var stopSection: Int
                    if isScrollingForward() {
                        calculatedOffSet = theTargetContentOffset - diffResistance
                        stopSection = calendarLayout.sectionFromOffset(calculatedOffSet)
                    } else {
                        calculatedOffSet = theTargetContentOffset + diffResistance
                        stopSection = calendarLayout.sectionFromOffset(calculatedOffSet)
                    }
                    if contentOffset > 0, let path = self.calendarView.indexPathForItemAtPoint(CGPoint(x: targetContentOffset.memory.x, y: calculatedOffSet)) {
                        let attrib = self.calendarView.layoutAttributesForItemAtIndexPath(path)!
                        if isScrollingForward() {
                            calculatedOffSet = attrib.frame.origin.y + attrib.frame.size.height
                        } else {
                            calculatedOffSet = attrib.frame.origin.y
                        }
                    } else if let attrib = self.calendarView.layoutAttributesForSupplementaryElementOfKind(UICollectionElementKindSectionHeader, atIndexPath: (NSIndexPath(forItem: 0, inSection: stopSection))) {
                        // change the final value to the end of the header
                        if isScrollingForward() {
                            calculatedOffSet = attrib.frame.origin.y + attrib.frame.size.height
                        } else {
                            calculatedOffSet =  stopSection - 1 < 0 ? 0 : calendarLayout.sectionSize[stopSection - 1]
                        }
                    }

                }
                setTargetContentOffset(calculatedOffSet)
            case let .NonStopTo(interval, resistance): // Both horizontal and vertical are fixed
                let diffResistance = diff * resistance
                var finalValue: CGFloat = 0
