ensure transaction is removed upon cleaning even if closing fails