Fix replication tests