Another bug fix in unit test