Linked list implementation iterator broken