fix bug of replication scheme