Fix randomly failing test.