fix typeahead bug