Bug fix in renderNode