more replication fixes