Bug correction in TreeNode constructors