Fix final link generation