Fix regression in autocomplete