Fixed non-deterministic tests