Removed wrong ifs and tests.