updated auto-clear search bar functionality