Minimal fix for replication race condition
ready for 1.0.16.1
Merge branch 'release-1.0.16'