fixed typeahead bug