fix image IOError