       do callback
 
   addDefaults: (node, callback) ->
-    process = @processes[node.id]
+    process = @getNode node.id
+    unless process
+      return callback new Error "Process #{node.id} not defined"
+    unless process.component
+      return callback new Error "No component defined for node #{node.id}"
 
     unless process.component.isReady()
       process.component.setMaxListeners 0 if process.component.setMaxListeners

    to = @getNode initializer.to.node
    unless to
      return callback new Error "No process defined for inbound node #{initializer.to.node}"

    unless to.component.isReady() or to.component.inPorts[initializer.to.port]
      to.component.setMaxListeners 0 if to.component.setMaxListeners

      callback null, process

  removeNode: (node, callback) ->
    process = @getNode node.id
    unless process
      return callback new Error "Node #{node.id} not found"
    process.component.shutdown (err) =>
      return callback err if err
      delete @processes[node.id]
      callback null
