replication bugfix