Finished tree traversal problem