fixes to xpath_filter()