Fixing uninitialised linked list pointer