fix non-deterministic test