fix bugs in linked_list