Bug fix for the search and autocompleter