Fixed the bug fir root node allocation