fixed bug on linkedlist