correcting index for links