fix bug in cond