         code2 isnt code and code2.split('-')[0] is code)
     for code, localeInfo of locale when not (code in genericCodes) or code is preferred
       $select.append(
-        $("<option></option>").attr("value", code).text(localeInfo.nativeDescription))
+        $("<option></option>").val(code).text(localeInfo.nativeDescription))
     $select.val(preferred).fancySelect()
 
   showDiplomatSuggestionModal: ->

      errors = JSON.parse(res.responseText)
      console.warn "Error saving language:", errors
    res.success (model, response, options) ->
      #console.log "Saved language:", newLang
  events:
    "click #logout-button": "logoutAccount"
    'change .language-dropdown': 'showDiplomatSuggestionModal'

  shortcuts:
    'backspace, delete': 'preventBackspace'
#    'backspace': 'preventBackspace'
