(#2478) - cancel changes when replication is canceled

simplified version of #2478
gazaa?