     # Find the start and end TextNode.
     checkStart = (node) ->
       if checkNode(node) then start = node
-      return not (start or node is last)
+      return start or node is last
 
     checkEnd = (node) ->
       if checkNode(node) then end = node
-      return not (end or node is start)
+      return end or node is start
 
     someNode(startContainer, checkStart)
     someNode(endContainer, checkEnd, preLast)

      first = firstLeaf(bounds)
      checkEnd = (node) ->
        if isTextNode(node) then end = node
        return not (end or node is first)
      someNode(bounds, checkEnd, preLast)
      @end = end


      last = lastLeaf(bounds)
      checkStart = (node) ->
        if isTextNode(node) then start = node
        return start or node is last
      someNode(bounds, checkStart)
      @start = start

