fixes probabilistic bug