Make it more robust when downloading images