some fixes to linked list