fix various link bugs