       requiredFields = requiredData[provider]
       fields = requiredFields.map (field) -> field.name ? field
 
-      helpers._loadCredentials { provider, fields }, stack.credentials, (err, data) ->
+      helpers._loadCredentials { provider, fields }, (err, items) ->
         return callback err  if err
-        data.fields = requiredFields
-        callback null, data
+        callback null, { items, provider, fields : requiredFields }
 
 
     getKDCmd: (callback) ->


  helpers =

    _loadCredentials: (selector, selectedCredentials, callback) ->

      options  = { '_id' : -1 }
      remote.api.JCredential.some selector, options, (err, items) ->
        return callback err  if err

        { provider } = selector
        defaultItem  = selectedCredentials?[provider]?.first
        callback null, _.extend { items, defaultItem }, selector


    loadCredentials: (stack, callback) ->

        break  if provider in ['aws', 'vagrant']
      provider ?= (Object.keys stack.credentials ? { aws : yes }).first

      helpers._loadCredentials { provider }, (err, items) ->
        return callback err  if err

        defaultItem = stack.credentials?[provider]?.first
        result = { items, defaultItem, provider }

        return callback null, result  unless defaultItem

        isAvailable = (
