fixed issue with link generation