fix notice in get_links