     return credentials
 
 
-  handleSaveChanges: (credentials, callback = kd.noop) ->
+  save: (credentials, callback = kd.noop) ->
+
+    unless @isSelectionChanged()
+      return callback null
 
     credentials  ?= @getSelectedCredentials()
     stackTemplate = @getData()
+
+    if customVariables = stackTemplate.credentials.custom
+      credentials.custom = customVariables
 
     stackTemplate.update { credentials }, (err, updatedTemplate) =>
 

      Events.CredentialChangesRevertRequested
    ], @bound 'updateCredentialSelections'

    @listController.on Events.CredentialChangesSaveRequested, =>
      @handleSaveChanges()

    @list = @listController.getListView()
    @list.on Events.CredentialSelectionChanged, =>

    templateCredentials = stackTemplate.getCredentialProviders()

    if @isSelectionChanged() and _.size selectedCredentials
      @save selectedCredentials, callback
    else if templateCredentials.length is 0
      @emit Events.WarnAboutMissingCredentials
      callback { error: 'Missing Credentials' }
