fixed bug in linkedlist