       JMachine.count { _id : target }, (err, count)=>
         if err? or count is 0
         then callback new KodingError "Target does not exists"
-        else @unbindMachine target, callback
+        else @unbindMachine ObjectId(target), callback
 
 
   @one$: permit 'list domains',

      JMachine.count { _id : target }, (err, count)=>
        if err? or count is 0
        then callback new KodingError "Target does not exists"
        else @bindMachine target, callback


  unbindMachine$: permit



  bindMachine: (target, callback)->
    @update $addToSet: machines: target, callback

  unbindMachine: (target, callback)->
    @update $pullAll: machines: [ target ], callback


  bindMachine$: permit
