fix link generation