fix attribute names and xpath queries