Fixed some linked list issues