Add small forgotten conditional in add_link() helper