fix links to be set in links obj correctly