Fix deletion from linked list.