Mahalanobis doc correction