             boundingRect = layoutManager.boundingRectForGlyphRange(layoutManager.glyphRangeForCharacterRange(paraRange, actualCharacterRange: nil), inTextContainer: textContainer)
             boundingRect!.origin.x = 0
             boundingRect!.size.width = frame.width
-            stop.initialize(true)
+            stoppedOnEnumeration = totalEnumerations
+            //stop.initialize(true)
           }
         } else {
+          if stoppedOnEnumeration != -1 {
+            stoppedOnEnumeration++
+          }
           var characterRangeString = storage.string()!.substringWithRange(charRange).stringByTrimmingCharactersInSet(NSCharacterSet.newlineCharacterSet())
           if countElements(characterRangeString) > 0 {
             numberOfExtraLines++
           }
-          
-          
-        }
+        }
+        
     }
     layoutManager.enumerateLineFragmentsForGlyphRange(glyphsToShow,
       usingBlock: lineFragmentClosure)
     if  boundingRect == nil {
-      println(lineNumber)
-      println(numberOfExtraLines)
       let LineHeight = font.lineHeight + lineSpacing
       let LineNumberRect = CGRect(
         x: 0,
-        y: LineHeight * CGFloat(lineNumber - numberOfExtraLines),
+        y: LineHeight * CGFloat(lineNumber - 1 + numberOfExtraLines),
         width: frame.width,
         height: LineHeight)
       boundingRect = LineNumberRect
+    }
+    //This is to correct for a weird extra line that TextKit puts at the end
+    if stoppedOnEnumeration == totalEnumerations {
+      boundingRect!.size.height -= font.lineHeight
     }
     
     return boundingRect!

  
  
  func dimLineUnderLocation(location:CGPoint) {
    //let currentLine = lineNumberUnderPoint(location)
    let currentLine = Int((location.y / (font.lineHeight + lineSpacing)))
    slightlyDimLineWhileDraggingOver(lineNumber: currentLine)
  }
  
  func slightlyDimLineWhileDraggingOver(#lineNumber:Int) {
    //let FirstLineNumberRect = getLineNumberRect(lineNumber)
    let LineHeight = font.lineHeight + lineSpacing
    let FirstLineNumberRect = CGRect(
      x: 0,
      y: LineHeight * CGFloat(lineNumber ),
      width: frame.width,
      height: LineHeight)
    let HighlightingRect = CGRect(
      x: FirstLineNumberRect.origin.x,
      y: FirstLineNumberRect.origin.y,

  
  func adjustLineViewsForDragLocation(loc:CGPoint) {
    //calculate which line the drag is currently on
    var lineNumber = lineNumberUnderPoint(loc)
    
    var maxLine = 1
    for key in dragOverlayLabels.keys {
