fix unit test errors