cleanup for search queries