         if pos < jump
           word -= 1
           jump -= pos
-          pos = @getWord(word).length - 1
+          pos = @getWord(word).word.length - 1
 
           if word < 0
             return null

    # Check if they're contiguous
    if selection.endPos.word == @startPos.word or
       (selection.endPos.word == @startPos.word -1 and
        selection.endPos.loc == rte.getWord(selection.endPos.word).length() and
        @startPos.loc == 0)
      # boundaries of new selection
      start = selection.startPos

    # insert the content at position
    currWord = currWord.substring(0, pos) + content + currWord.substring(pos)

    # cut the wordcon
    newWords = currWord.match WordRegExp
    tmp = currWord.match PreSpacesRegExp
    if tmp isnt null
