fixed type-issue for linked list indices

thanks, Nate, for reporting this issue