fix a bug in conditional ops