Fixing bug with script and css introduced during cors work