Unit-test fixes