The logic here seems a bit inconsistent. Under what conditions do you expect the first ZU.xpath to fail, given the if statement?