remove links when remove nodes