Fix bug in new replication mechanism.