Fixes in BinTreeNodeWriter