fix image cannot be deleted