fix infinite_loop in cluster_state/[12]