Fixed doubly linked list issues