fix on replication destruction