 
       @eventListener = new ComputeEventListener
 
-      @on "machineBuildCompleted", => delete @stacks
+      @on "MachineBuilt",   @bound 'reset'
+      @on "MachineDestroy", @bound 'reset'
 
       @fetchStacks => @emit 'ready'
 


      callback null, @machines = machines

  fetchMachine: (idOrUid, callback = noop)->

    KD.remote.api.JMachine.one idOrUid, (err, machine)->

    KD.remote.api.ComputeProvider.createGroupStack (err, stack)=>
      return if KD.showError err

      @reset()
      @emit "renderStacks"


  reset:->

    @stacks   = null
    @machines = null

  errorHandler = (task, eL, machine)-> (err)->

