update paths for link creation. fix link index