Fixed XHR request issue