some replica API fixes
merge