Fix bug in tests.