     location.href = result.url
 
   destroyAutocomplete: ->
-    @catComplete.destroy() if @catComplete?
-    @catComplete = null
+    @autocomplete.destroy() if @autocomplete isnt undefined
+    @searchInput.attr('autocomplete', 'off')
+    @autocomplete = undefined

  createAutocomplete: ->
    @query = "?project_id=" + @projectId + "&project_ref=" + @projectRef

    @catComplete = @searchInput.catcomplete
      appendTo: 'form.navbar-form'
      source: @autocompletePath + @query
      minLength: 1


    @saveOriginalState()

    # If there's no location badge
    if !@locationBadgeEl.children().length
      @createAutocomplete()

    @bindEvents()
