Fixes to scraping code