Fixed unit test bug