Fixes linked list in problem 3.
Fixes linked list in problem 3.