     else if domain and rule
       createConnection()
       @bindRuleToDomain domain, rule
-    else if vm and extra
+    else if machine and extra
       createConnection()
 
   bindRuleToDomain: (domain, rule) ->

    EnvironmentRuleContainer    : 'rules'
    EnvironmentExtraContainer   : 'extras'
    EnvironmentDomainContainer  : 'domains'
    EnvironmentMachineContainer : 'vms'

  itemMap      =
    EnvironmentRuleItem         : 'rule'
    EnvironmentExtraItem        : 'extra'
    EnvironmentDomainItem       : 'domain'
    EnvironmentMachineItem      : 'vm'

  constructor: (stack)->
    super
      cssClass  : 'environments-scene'
      lineWidth : 2
      lineColor : "#4ED393"

    @boxes = {}
    @stack = stack

    sc = KD.getSingleton 'appStorageController'
    @appStorage = sc.storage 'EnvironmentsScene', '1.0.1'

    else if domain and rule
      removeConnection()
      @unboundRuleFromDomain domain, rule
    else if machine and extra
      removeConnection()

  connect:(source, target, internal = no)->
