Fix fragile tests.