loadResources called twice