fixed possible issue where getValueAndReset is called before refreshPartitions is ever called