various improvements on the replicator side to make replication work