fixed autocomplete bug