Fix #325 fix replication creation