Fixed makeNode and makeRootNode methods