bugs in erasing sub-conditions