Fixed the CORS check and fallback.