Check that nodes are correctly replaced