xpath var and fix up