Switch to using XPath.first method