Fixes to node generation