minor fixes on linked list