fix image cleanup