Fix fatal errors in tests.