fix query scraping