Replication integration fixes