Fixed CORS check and fallback.
Merge pull request #31 from pjackson28/updatecorscheck

Fixed CORS check and fallback.