         }
         
         let pointPathCreator = getPointPathCreator()
-        let numberOfPoints = min(data.count, activePointsInterval.endIndex)
-        
-        for i in activePointsInterval.startIndex ... numberOfPoints {
+        
+        for i in activePointsInterval {
             
             var location = CGPointZero
             

        
        currentLinePath.removeAllPoints()
        
        let numberOfPoints = min(data.count, activePointsInterval.endIndex)
        
        let pathSegmentAdder = lineStyle == .Straight ? addStraightLineSegment : addCurvedLineSegment
        
        zeroYPosition = calculatePosition(0, value: self.range.min).y

        let actualMin = clamp(min - numberOfPointsOffscreen, min: minPossible, max: maxPossible)
        let actualMax = clamp(max + numberOfPointsOffscreen, min: minPossible, max: maxPossible)
        
        return actualMin ... actualMax
    }
    
    private func calculateRangeForActivePointsInterval(interval: Range<Int>) -> (min: Double, max: Double) {
        
        let dataForActivePoints = data[interval]
        
        // We don't have any active points, return defaults.
        if(dataForActivePoints.count == 0) {
