Fix replication test