fix errors in open_link method