Fixed a variable name error in get_ref_link