Fix various unit tests.