wtf is happening to my linked list