Fixed problem with mass distributions.