Fix loading of files via XHR.