         case .Delete:
             tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Automatic)
         case .Update:
-            configureCell(tableView.cellForRowAtIndexPath(indexPath), indexPath: indexPath  )
+            configureCell(tableView.cellForRowAtIndexPath(indexPath), toDo: anObject as ToDo  )
         case .Move:
             if !contains(sectionsBeingAdded, newIndexPath.section) && !contains(sectionsBeingRemoved, indexPath.section) {
                 tableView.moveRowAtIndexPath(indexPath, toIndexPath: newIndexPath)

        tableView.deselectRowAtIndexPath(indexPath, animated: true)
        
        let toDo = toDosController.objectAtIndexPath(indexPath) as ToDo
        
        
        toDo.edit() { $0.done = !$0.done.boolValue }
        toDo.managedObjectContext.save(nil)
    }

    // Private methods
    //
    
    func configureCell(cell: UITableViewCell, toDo: ToDo) {
        cell.textLabel.text = toDo.title
    }
    
