diff --git a/planetstack/openstack/driver.py b/planetstack/openstack/driver.py
index 530d93b..4c0791e 100644
--- a/planetstack/openstack/driver.py
+++ b/planetstack/openstack/driver.py
@@ -312,9 +312,9 @@
         if not security_group:
             security_group = self.config.nova_default_security_group 
 
-        #authorized_keys = "\n".join(pubkeys)
-        #files = {'/root/.ssh/authorized_keys': authorized_keys}
         files = {}
+        if pubkeys:    
+            files['/root/.ssh/authorized_keys'] = "\n".join(pubkeys)
        
         hints = {}
         availability_zone = None
diff --git a/planetstack/openstack/manager.py b/planetstack/openstack/manager.py
index 131b8fb..f912270 100644
--- a/planetstack/openstack/manager.py
+++ b/planetstack/openstack/manager.py
@@ -252,10 +252,13 @@
     @require_enabled
     def save_sliver(self, sliver):
         if not sliver.instance_id:
+            slice_memberships = SliceMembership.objects.filter(slice=sliver.slice)
+            pubkeys = [sm.user.public_key for sm in slice_memberships if sm.user.public_key != null] 
             instance = self.driver.spawn_instance(name=sliver.name,
                                    key_name = sliver.creator.keyname,
                                    image_id = sliver.image.image_id,
-                                   hostname = sliver.node.name )
+                                   hostname = sliver.node.name,
+                                   pubkeys = pubkeys )
             sliver.instance_id = instance.id
             sliver.instance_name = getattr(instance, 'OS-EXT-SRV-ATTR:instance_name')
 
diff --git a/planetstack/openstack/observer.py b/planetstack/openstack/observer.py
index 0690558..85c4c2c 100644
--- a/planetstack/openstack/observer.py
+++ b/planetstack/openstack/observer.py
@@ -59,14 +59,14 @@
         for site in pending_sites:
             self.manager.save_site(site)
             site.enacted = datetime.now()
-            site.save()
+            site.save(update_fields=['enacted'])
 
         # get all slices that need to be synced (enacted < updated or enacted is None)
         pending_slices = Slice.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
         for slice in pending_slices:
             self.manager.save_slice(slice)
             slice.enacted = datetime.now()
-            slice.save()
+            slice.save(update_fields=['enacted'])
 
         # get all sites that where enacted != null. We can assume these sites
         # have previously been synced and need to be checed for deletion.
@@ -101,9 +101,10 @@
         # get all users that need to be synced (enacted < updated or enacted is None)
         pending_users = User.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
         for user in pending_users:
+            print "syncing user", user
             self.manager.save_user(user)
             user.enacted = datetime.now()
-            user.save()
+            user.save(update_fields=['enacted'])
 
         # get all users that where enacted != null. We can assume these users
         # have previously been synced and need to be checed for deletion.
@@ -135,7 +136,7 @@
                 self.manager.init_caller(sliver.creator)
                 self.manager.save_sliver(sliver)
                 sliver.enacted = datetime.now()
-                sliver.save()
+                sliver.save(update_fields=['enacted'])
 
         # get all slivers that where enacted != null. We can assume these users
         # have previously been synced and need to be checed for deletion.
@@ -150,6 +151,7 @@
         for instance in instances:
             if instance.id not in sliver_dict:
                 # lookup tenant and update context  
-                tenant = self.manager.driver.shell.keystone.tenants.findall(id=instance.tenant_id) 
-                self.manager.init_admin(tenant=tenant.name)  
-                self.manager.driver.destroy_instance(instance.id)
+                #tenant = self.manager.driver.shell.keystone.tenants.findall(id=instance.tenant_id) 
+                #self.manager.init_admin(tenant=tenant.name)  
+                #self.manager.driver.destroy_instance(instance.id)
+                pass
