diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php
index 17addc86c9d840b184932feeb0e8d70d5966a54f..db286d7ad7dc44eb240a1afab440912de5bbf8ce 100644
--- a/lib/private/App/AppManager.php
+++ b/lib/private/App/AppManager.php
@@ -462,7 +462,7 @@ class AppManager implements IAppManager {
 
 	public function getAppVersion(string $appId, bool $useCache = true): string {
 		if(!$useCache || !isset($this->appVersions[$appId])) {
-			$appInfo = \OC::$server->getAppManager()->getAppInfo($appId);
+			$appInfo = $this->getAppInfo($appId);
 			$this->appVersions[$appId] = ($appInfo !== null && isset($appInfo['version'])) ? $appInfo['version'] : '0';
 		}
 		return $this->appVersions[$appId];