fixed bugs (reported from Jonah) for unstable calculations for dN/dy for mc_sampling = 3