fix bug in removing sub-conditions