Fix loading of resources