Fixed bug with autocomplete