Fix nested nodes

Fixes #1