more fixes to cond and subst