fix probability bug