diff --git a/src/Folklore/GraphQL/GraphQL.php b/src/Folklore/GraphQL/GraphQL.php
index 53cfb98c..b66aec22 100644
--- a/src/Folklore/GraphQL/GraphQL.php
+++ b/src/Folklore/GraphQL/GraphQL.php
@@ -67,7 +67,7 @@ public function schema($schema = null)
                 $this->typesInstances[$name] = $objectType;
                 $types[] = $objectType;
                 
-                $this->addType($type, $name);
+                $this->addType($type, is_numeric($name) ? null : $name);
             }
         } else {
             foreach ($this->types as $name => $type) {
diff --git a/tests/GraphQLTest.php b/tests/GraphQLTest.php
index 143d6580..4860ccd7 100644
--- a/tests/GraphQLTest.php
+++ b/tests/GraphQLTest.php
@@ -77,14 +77,21 @@ public function testSchemaWithArray()
                 'updateExampleCustom' => UpdateExampleMutation::class
             ],
             'types' => [
-                CustomExampleType::class
+                CustomExampleType::class,
+                AnotherCustomExampleType::class
             ]
         ]);
-        
+
+        $graphql_types = GraphQL::getTypes();
+        $schema_types = $schema->getTypeMap();
+
         $this->assertGraphQLSchema($schema);
         $this->assertGraphQLSchemaHasQuery($schema, 'examplesCustom');
         $this->assertGraphQLSchemaHasMutation($schema, 'updateExampleCustom');
-        $this->assertArrayHasKey('CustomExample', $schema->getTypeMap());
+        $this->assertArrayHasKey('CustomExample', $schema_types);
+        $this->assertArrayHasKey('AnotherCustomExample', $schema_types);
+        $this->assertArrayHasKey('CustomExample', $graphql_types);
+        $this->assertArrayHasKey('AnotherCustomExample', $graphql_types);
     }
     
     /**
diff --git a/tests/Objects/AnotherCustomExampleType.php b/tests/Objects/AnotherCustomExampleType.php
new file mode 100644
index 00000000..720c12d6
--- /dev/null
+++ b/tests/Objects/AnotherCustomExampleType.php
@@ -0,0 +1,23 @@
+<?php
+
+use GraphQL\Type\Definition\Type;
+use Folklore\GraphQL\Support\Type as GraphQLType;
+
+class AnotherCustomExampleType extends GraphQLType
+{
+
+    protected $attributes = [
+        'name' => 'AnotherCustomExample',
+        'description' => 'An example'
+    ];
+
+    public function fields()
+    {
+        return [
+            'test' => [
+                'type' => Type::string(),
+                'description' => 'A test field'
+            ]
+        ];
+    }
+}