diff --git a/mirzaev/arangodb/system/collection.php b/mirzaev/arangodb/system/collection.php
index 4d1dd2e..0c033fe 100755
--- a/mirzaev/arangodb/system/collection.php
+++ b/mirzaev/arangodb/system/collection.php
@@ -179,10 +179,10 @@ class collection
 			// Count and exit (success)
 			return static::execute(
 				<<<'AQL'
-					RETURN LENGTH(@collection)
+					RETURN LENGTH(@@collection)
 				AQL,
 				[
-					'collection' => $collection
+					'@collection' => $collection
 				]
 			);
 		} catch (exception $e) {
diff --git a/mirzaev/arangodb/system/document.php b/mirzaev/arangodb/system/document.php
index 193f119..5967e65 100755
--- a/mirzaev/arangodb/system/document.php
+++ b/mirzaev/arangodb/system/document.php
@@ -51,7 +51,7 @@ class document
 		bool $check = false,
 		?terminal $terminal = null,
 		array &$errors = []
-	): ?string {
+	): string|null|false {
 		try {
 			// Инициализация коллекции
 			collection::initialize($collection, isset($data['_from'], $data['_to']) ? type::edge : type::document);