unit test bug fixed