Fixes to unittests.