Fixing bugs when merging clusters.