Fixed a minor bug in search query