Fixed CORS check and fallback.