Fixed the creation of objects with maps