hack to avoid CORS redirect error