fixing bugs with search bar