Added isXmlHttp check