Fix bug when removing children nodes and add comments