Fix serialization of sync/async replication type