Also updates the max node id

Signed-off-by: Tzu-Li Tai <tzulitai@ee.ncku.edu.tw>