Fix flapping tests