Major Bugfix for clustering