Fixed most of the tests.