Fixed closeLeaf.