fix xpath bug when no links in selected element.