Fixed bug in unittest.