fixed issue in sampleProb