Added support for multiple XHR calls.