Fix typeahead bug