   disconnect: ->
 
     onClosed = (success) =>
-      @transport = null
+      @runtime = null
       @emit 'status',
         online: false
         label: 'disconnected'
       @emit 'disconnected'
 
-    if @transport
-      @transport.close onClosed
+    if @runtime
+      @runtime.transport.close onClosed
     else
       onClosed false
 

      @buffer.push msg
      return

    sendFunc = (response) =>
      @onMessage { data: response }
    conn = { send: sendFunc }
    try
      microflo.runtime.handleMessage msg, conn, @microfloGraph, @transport, @debugLevel
    catch e
      console.log e.stack
      console.log e

    @container = null

    # MicroFlo things
    @runtime = null

    @on 'connected', @updatecontainer

    super definition

  isConnected: -> @runtime isnt null

  getElement: -> @container

