Fix search query issue