Change centroid parameter to reduce chances of "Singular matrix!" error