Tried moving definition of AddNodeAttributes