 
     info "Credential selected:", value
 
-    if value is "_add_"
+    if value is "_add_" and @addCredentialForm?
       @instanceListView.hide()
       @credentialBox.hide()
       @addCredentialForm.setClass 'in'

      @credentialBox.setSelectOptions
        "Select credential..." : @_credOptions

      @credentialBox.show()
      value = credentialKey ? @_credOptions.first.value
      @credentialBox.setValue value
      @showAvailablesFor value


      return if KD.showError err

      if credentials.length is 0 and @addCredentialForm?
        @credentialBox.hide()
        @instanceListView.hide()
        @addCredentialForm.buttons.Cancel.hide()
