Kmeans cleanup

Aren't we missing some SG_UNREF here?