Fixed search query bug