Fix a bug of downloading images