Fixed bugs in LinkedList.cpp