fix non-deterministic test failure