diff --git a/mpcdf_common.py b/mpcdf_common.py
index e0816bc26b7c6cb42ed735670954b4f704468cd6..706dca4f4fdac4548fb17ebcd885809e550383f7 100644
--- a/mpcdf_common.py
+++ b/mpcdf_common.py
@@ -886,10 +886,10 @@ def sync_projects(api_url, package=None, from_project="software", to_projects=No
             enable_repos = get_attribute_values(api_url, from_project, orig_package, "MPCDF:enable_repositories")
             if orig_package not in to_packages:
                 if len(enable_repos) == 0:
-                    print("Not branching package {0}, is disabled".format(package))
+                    print("Not branching package {0}, is disabled".format(orig_package))
                     continue
                 elif enable_repos == ["system"]:
-                    print("Not branching package {0}, is only enabled for 'system'".format(package))
+                    print("Not branching package {0}, is only enabled for 'system'".format(orig_package))
                     continue
                 filelist = osc.core.meta_get_filelist(api_url, from_project, orig_package)
                 if "_link" in filelist: