Fixed bug in pointDistSample