Minimal fix for replication race condition
ready for 1.0.16.1