serious bug correction in replication system