Fix most unit tests.