fix unit test issues