fix unit test bug