fixed the unit test errors