tree2string test, fix for edge case