Fix test flaking