bug fix in get_weak_links in brainnet class