 
         # remove the firstAddedLine from the fragment
         firstAddedLine = dummyLine.lineNext
-        secondAddedLine = firstAddedLine.lineNext
-        frag.removeChild(frag.firstChild)
-        delete this._lines[firstAddedLine.lineID]
+        secondAddedLine = firstAddedLine?.lineNext
+        if frag.firstChild?
+            frag.removeChild(frag.firstChild)
+        if firstAddedLine?
+            delete this._lines[firstAddedLine.lineID]
 
         # 7- updates nextLine and prevLines, insert frag in the editor
         if secondAddedLine?

                    text = prevLine.lastChild.previousSibling.firstChild
                    range.collapseToPoint text, offset
                    @currentSel.sel.setSingleRange range

                    # e.preventDefault()
                # if there is no previous line : backspace at the beginning of 

        # 2- Case of a selection contained in a line
        else if sel.endLine == startLine
            console.log '_backspace 6 - test ok2'
            text = startLine.line$[0].lastChild.previousSibling.firstChild
            range = rangy.createRange()
            range.collapseToPoint text, text.length - 1
            @currentSel.sel.setSingleRange range
            #@currentSel.sel.range.deleteContents()

        # 3- Case of a multi lines selection
        else
            console.log '_backspace 7'
            @_deleteMultiLinesSelections()
            e.preventDefault()

        return false


