Fix unit test failures