adding locks when reading cluster and fixing cluster reset issue