Prevent probabilistic error in tests