Corrected Improper in place alteration in mk_stochastic function