fix randomness in tests