fix image copying