Fix deletion in linked list