fixed bug in distribute value