Various fixes for typeahead