fix defect in singly linked list