Fixed loading of resources.