Fixed a unit test bug