fixing issues in nonMarked to marked xpath conversion