kludgey fix for XHR redirects