Fix sporadic test failure