a few fixes to the image download process