 
   createTerminal: (machine, path, session) ->
 
-    machine ?= @getCurrentMachine()
+    {appManager} = KD.singletons
+
+    machine ?= appManager.getFrontApp().mountedMachine
     path    ?= @getCurrentWorkspacePath()
 
     terminalPane = new IDE.TerminalPane { machine, path, session }

        separator         : yes
      'Split Vertically':
        callback          : ->
          KD.getSingleton('appManager').getFrontApp().splitVertically()
      'Split Horizontally':
        callback          : ->
          KD.getSingleton('appManager').getFrontApp().splitHorizontally()

    if @parent instanceof KDSplitViewPanel
      items['Undo Split'] =
        separator         : yes
        callback          : ->
          KD.getSingleton('appManager').getFrontApp().mergeSplitView()
    else
      items['']           = # TODO: `type: 'separator'` also creates label, see: https://cloudup.com/c90pFQS_n6X
        type              : 'separator'


  getPlusMenuItems: ->

    {appManager} = KD.singletons

    machine = appManager.getFrontApp().mountedMachine
    terminalSessions =
      "New Session"  :
        callback     : => @createTerminal machine
