Fixed pseudo-ifs and adapted tests.