Fixing resetMatches bug in typeahead.