fix wrong cond being used