fix the function erasing a sub-condition from a condition