Resolve bug in node

There was a bug in the remove node, when the deleted node is last in the list. Now the problem is solve