Conditions search bar not working properly