fixing race condition in ShardCoordinator