Fix unit-test bug