Fixed the creation of resources