diff --git a/staffeln/objects/queue.py b/staffeln/objects/queue.py
index 0e81064..b6f9b76 100644
--- a/staffeln/objects/queue.py
+++ b/staffeln/objects/queue.py
@@ -10,13 +10,12 @@
 
     dbapi = db_api.get_instance()
 
-    feilds = {
+    fields = {
         'id': sfeild.IntegerField(),
         'backup_id': sfeild.StringField(),
         'volume_id': sfeild.UUIDField(),
         'instance_id': sfeild.StringField(),
-        'backup_status': sfeild.IntegerField(),
-        'executed_at': sfeild.DateTimeField()
+        'backup_status': sfeild.IntegerField()
     }
 
     @base.remotable_classmethod
@@ -24,6 +23,22 @@
         db_queue = cls.dbapi.get_queue_list(context, filters=filters)
         return [cls._from_db_object(cls(context), obj) for obj in db_queue]
 
+    @base.remotable_classmethod
+    def get_by_backup_id(cls, context, backup_id):
+        """Find a backup based on backup_id
+        :param context: Security context. NOTE: This should only
+                        be used internally by the indirection_api.
+                        Unfortunately, RPC requires context as the first
+                        argument, even though we don't use it.
+                        A context should be set when instantiating the
+                        object, e.g.: Queue(context)
+        :param backup_id: the backup id of volume in queue.
+        :returns: a :class:`Queue` object.
+        """
+        db_queue = cls.dbapi.get_queue_by_backup_id(context, backup_id)
+        queue = cls._from_db_object(cls(context), db_queue)
+        return queue
+
     @base.remotable
     def create(self):
         values = self.obj_get_changes()
@@ -40,5 +55,5 @@
 
     @base.remotable
     def refresh(self):
-        current = self.get_by_uuid(uuid=self.uuid)
+        current = self.get_by_backup_id(backup_id=self.backup_id)
         self.obj_refresh(current)
diff --git a/staffeln/objects/volume.py b/staffeln/objects/volume.py
index 80a9663..8952164 100644
--- a/staffeln/objects/volume.py
+++ b/staffeln/objects/volume.py
@@ -14,18 +14,19 @@
         'id': sfeild.IntegerField(),
         'backup_id': sfeild.StringField(),
         'instance_id': sfeild.StringField(),
-        'volume_id': sfeild.UUIDField()
+        'volume_id': sfeild.UUIDField(),
+        'backup_completed': sfeild.IntegerField()
     }
 
-    @base.remotable
-    def list(cls, filters=None):
+    @base.remotable_classmethod
+    def list(cls, context, filters=None):
         """Return a list of :class:`Backup` objects.
 
         :param filters: dict mapping the filter to a value.
         """
-        db_backups = cls.dbapi.get_backup_list(filters=filters)
+        db_backups = cls.dbapi.get_backup_list(context, filters=filters)
 
-        return [cls._from_db_object(cls, obj) for obj in db_backups]
+        return [cls._from_db_object(cls(context), obj) for obj in db_backups]
 
     @base.remotable
     def create(self):
@@ -55,5 +56,5 @@
         checks for updated attributes. Updates are applied from
         the loaded backup column by column, if there are any updates.
         """
-        current = self.get_by_uuid(uuid=self.uuid)
+        current = self.get_by_uuid(backup_id=self.backup_id)
         self.obj_refresh(current)
