Fix autocomplete bug