fix downloading of images