fix wrong link handling