fix bug write broken links