cps-tools: Fix bug when removing nodes (issue #77)