Fix intermittent test failures.