fixed issue 8: problem with outlier having zero distances