diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php
index 3bb275a4d3c134776dbd8e73ce093e3fae7f4857..f73e09e645e9bb5edaff3c4d40361c83f0da7201 100644
--- a/lib/private/AppFramework/Utility/SimpleContainer.php
+++ b/lib/private/AppFramework/Utility/SimpleContainer.php
@@ -73,13 +73,13 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
 		}
 
 		return $class->newInstanceArgs(array_map(function (ReflectionParameter $parameter) {
-			$parameterClass = $parameter->getClass();
+			$parameterType = $parameter->getType();
+
+			$resolveName = $parameter->getName();
 
 			// try to find out if it is a class or a simple parameter
-			if ($parameterClass === null) {
-				$resolveName = $parameter->getName();
-			} else {
-				$resolveName = $parameterClass->name;
+			if ($parameterType !== null && !$parameterType->isBuiltin()) {
+				$resolveName = $parameterType->getName();
 			}
 
 			try {
@@ -91,7 +91,7 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
 					return $parameter->getDefaultValue();
 				}
 
-				if ($parameterClass !== null) {
+				if ($parameterType !== null && !$parameterType->isBuiltin()) {
 					$resolveName = $parameter->getName();
 					return $this->query($resolveName);
 				}