fix slice capaticy bug in nodes alloc memory