fix replication errror