Fixed some things in the scraping algorithm