Fix: Destroy the linked list before removing the node

Solves the todo from the source.