Fixed performance problem related to calculating dispersions in clusters