k-means: missing variable initialization