Fixed linkedList indexing bug