diff --git a/tzis/swifthandling.py b/tzis/swifthandling.py
index 4a9ae2a475c8cddb8a94beba146f36a5a04f7482..725fec9b563a52c7edab0cd3a1831ac04a425378 100644
--- a/tzis/swifthandling.py
+++ b/tzis/swifthandling.py
@@ -171,15 +171,16 @@ def get_token(swift_base, account, username=None, **kwargs):
     env,expires =  _get_envtoken(**kwargs)
     return env
 
-def toggle_public(fsmap):
+def toggle_public(container):
     "toggle container public read_acl settings"
     getenv = os.environ.get
-    conn = Connection(preauthurl=getenv('OS_STORAGE_URL'),
+    osurl=getenv('OS_STORAGE_URL')
+    conn = Connection(preauthurl=osurl,
                       preauthtoken=getenv('OS_AUTH_TOKEN'))
-    acl = conn.head_container(fsmap.root).get("x-container-read", "")
+    acl = conn.head_container(container).get("x-container-read", "")
     if ".r:*" in acl:
         acl = acl.replace(".r:*", "")
     else:
         acl = ",".join([acl, ".r:*,.rlistings"])
     acl = ",".join(sorted(filter(None, set(acl.split(",")))))
-    conn.post_container(fsmap.root, headers={"X-Container-Read": acl})
+    conn.post_container(container, headers={"X-Container-Read": acl})