Fixed bug in unit tests.