fixed a bug in ReplicaExchangeMacro close #25