fix replication behavior