Fix bug in a unit test