xpath tests, bug fix