fixed $prob calculation.