bug fix for #216 variables for mode strings, and call xpath xquery