Fixes for scrapy frontier middleware