fixed code for 3+ links with same rel

fixes #4