merge with first two patches.
merge with ReplicatedBackend patch