At least this is looking better.... Fixed it so mahalanobis is working.