fix the bug of search bar and add autocomplete