     while i < queue.length and i < max
       [type, [className, model], timestamp] = queue[i]
 
+      ## Handles client list IDs ##
+
+      # Example: You create a task in list "c-10"
+      # The list ID gets changed to "s-5" on the server
+      # This code matches that list back to the task
+
+      if type in ["create", "update"] and
+      className is "Task" and model.list.slice(0,2) is "c-"
+
+        # The list hasn't been assigned a server ID yet
+        if client[model.list] is undefined
+
+          # We have already checked this task
+          if model._missing
+            Log "We have a missing task!"
+            i++
+            continue
+
+          else
+            Log "Moving Task #{model.id} in list #{model.list} to back of queue"
+            model._missing = yes
+            queue[queue.length] = queue[i]
+            queue[i] = []
+            i++
+            continue
+
+        else
+          Log "Found List ID #{model.list} has changed to #{client[model.list]}"
+          model.list = client[model.list]
+          delete model._missing
+
       switch type
         when "create"
-
-          # Check for client IDs
-          if className is "Task" and model.list.slice(0,2) is "c-"
-
-            # The list hasn't been assigned a server ID yet
-            if client[model.list] is undefined
-
-              # We have already checked this task
-              if model._missing
-                Log "We have a missing task!"
-                i++
-                continue
-
-              else
-                Log "Moving Task #{model.id} in list #{model.list} to back of queue"
-                model._missing = yes
-                queue[queue.length] = queue[i]
-                queue[i] = []
-                i++
-                continue
-
-            else
-              Log "Found List ID #{model.list} has changed to #{client[model.list]}"
-              model.list = client[model.list]
-              delete model._missing
-
           oldId = model.id
           @create [className, model, timestamp], (newId) ->
             if className is "List"

              client[oldId] = newId

        when "update"
          # Is a client ID
          if model.list?.slice(0,2) is "c-"
            if client[className][model.id]?
              model.list = client[className][model.list]
          @update [className, model, timestamp]

        when "destroy"

  # Add a tasks to a list
  taskAdd: (taskId, listId) ->
    tasks = @findModel("List", listId).tasks
    return false unless tasks
    if tasks.indexOf(taskId) < 0
      tasks.push taskId
      @setModelAttributes "List", listId, tasks:tasks
