Small fixes late replication and a few more tests