Fix crashing API tests.