Replication behavior fixes 3.0

For 3.0 branch