fix test flakiness