Fix some problems with tree.c reported by users.