fix bugs in links