Fix bug on typeahead