fixed bug on distribution