Autocomplete bug fix