fix memleak of cluster object when iterating