Fix linked list creation