Fix flakey test