Repaired all the tests