Wan Replication fixes