Some unit test fixes