Fixed bug in distribution