fix to avatar loading with CSP enabled