fix the search bar issue when back to homepage