Fix search query parsing