           return callback new KodingError "Target not found."
 
         { models } = result
-        target = models[0]
+        [ target ] = models
 
         if target instanceof JUser
           target.fetchOwnAccount (err, account)=>


    success: (client, options, callback)->

      {target, owner, user} = options

      setPermissionFor = (target, callback)=>

        method = (x)-> if x then 'assureCredential' else 'removeCredential'

        daisy queue = [
          =>
            if user?
              target[method(user)]  this, as: 'user', queue.next
            else
              queue.next()
        ,
          =>
            if owner?
              target[method(owner)] this, as: 'owner', queue.next
            else
              queue.next()
        ,
          -> callback null
        ]

      JName.fetchModels target, (err, result)=>


        credential.save (err)->
          return  if failed err, callback, credData

          delegate.addCredential credential, as: "owner", (err)->
            return  if failed err, callback, credential, credData

