fix replication cancelation