fix image download crash issue