Fix incorrect cleanup of condition