Improve the logic to simultaneously handle jsonp responses.