Fixed bug in tests.