fix image crash