fixed bug in ReplicaExchange macro close #25