some fix for replication
Merge branch 'develop'