Fixing bugs in synchronous kmeans.