fix unittests bug