fixed undefined ref and added cloudflare proxies to the appropriate place