fixes to the node visitor pattern