More fixes for unittests.