Fixed a tiny bug of cataloguetree

fixed a tiny bug where the retrieved nodes after searching could cause an error when being inserted in the tree