Minor bug: had been using incorrect node types in newly modified code.