Linked list wasn't setting head to NULL when clearing list