fixing significant bug where node comparisons failed