Bug fix when removing a node: clear viewer