             # Assign a domain to machine
             else if c.machines? and c.domains?
 
-              d = results.domains[c.domains]
-              m = results.machines[c.machines]
-
-              unless d?.err and m?.err
-
-                d.obj.bindMachine m.obj.getId(), (err)->
+              domain  = results.domains[c.domains]
+              machine = results.machines[c.machines]
+
+              if not domain?.err and not machine?.err
+
+                domain.obj.bindMachine machine.obj.getId(), (err)->
                   results.connections.push { err, obj: ok: !err? }
                   queue.next()
 

              rule   = results.rules[c.rules]
              domain = results.domains[c.domains]

              unless rule?.err and domain?.err
                results.connections.push
                  err : new KodingError "Not implemented"
                  obj : null


      if err
        callback err
        return console.warn "Failed to create Machine for ", {users, groups}

      callback null, machine

