fixed some mistakes in linked list