fixed bug in z computation (Centroid has no Z)