found the kmeans bug. uninitialized Niter variable...