fixed search query bug