Fix IndexError

We cannot reference node attributes in the manner attempted.