fix clicking autocomplete bug