Fixed the bug that some times the smallClusters array cannot get cleared before getting new small clusters.