fixing bug in unit test