Bug fixing for xpath support