fixing issues with having both xapi and XAPI in urls