[Issue 1089] Bug in replication