fix replication and document it