fix a bug in autosuggest