Fixed XHR return method