fixed replication
Merge pull request #175 from dkulikovsky/replication_fix

fixed replication