fix the function `processTypeNode`
fix bugs
fix the double free issue