Added a small hack to avoid using an if on linked_remove.