       workspaceRefData.path = file.path
       @openedFiles.push file.path
 
-    @workspaceRef.child("tabs").push workspaceRefData  unless sessionKey
+    @tabsRef.push workspaceRefData  unless sessionKey
 
     pane.on "KDTabPaneDestroy", =>
       removedPaneIndex = @tabView.getPaneIndex pane

      content
    }

    @forwardEvent editor, 'EditorDidSave'
    @forwardEvent editor, 'OpenedAFile'

    pane.addSubView editor
    @editors.push editor

    @openedFiles      = []
    @editors          = []
    @activeTabIndex   = 0
    @tabsRef          = @workspaceRef.child "tabs"
    @indexRef         = @workspaceRef.child "ActiveTabIndex"

    @createEditorTabs()
    @createEditorInstance()  unless @isJoinedASession
