Fixed centroid calculation and colors for indexed models.