replication fixes