Fixing C++ linked list