                 self.deleted.appendContentsOf(deleted)
             }
 
-            self.handleResultWithError(error) {
+            self.handleResult(withCursor: nil, error: error, inDatabase: db) {
                 self.delete(record: record, inDatabase: db)
             }
         }

            Logging.log("Completion: \(cursor) - \(error)")
            Logging.log("Have \(self.records.count) records")
            
            self.handleResultWithError(error) {
                self.perform(query, limit: limit, pullAll: pullAll, inDatabase: db)
            }
        }
        
        database(db).addOperation(fetchOperation)
    }
}

private extension CloudRequest {
    func continueWith(cursor: CKQueryCursor, inDatabase db: UsedDatabase) {
        
    }
}

        Logging.log("Fetch \(query.recordType)")
        
        let fetchOperation = CKQueryOperation(query: query)
        
        execute(fetchOperation, limit: limit, pullAll: pullAll, inDatabase: db) {
            self.perform(query, limit: limit, pullAll: pullAll, inDatabase: db)
        }
    }

    private func continueWith(cursor: CKQueryCursor, limit: Int?, inDatabase db: UsedDatabase) {
        Logging.log("Continue with cursor")
        let operation = CKQueryOperation(cursor: cursor)
        execute(operation, limit: limit, pullAll: true, inDatabase: db) {
            self.continueWith(cursor, limit: limit, inDatabase: db)
        }
    }
    
    private func execute(fetchOperation: CKQueryOperation, limit: Int?, pullAll: Bool, inDatabase db: UsedDatabase, retryClosure: () -> ()) {
        Logging.log("Run query operation")
        if let limit = limit {
            fetchOperation.resultsLimit = limit
        }

        fetchOperation.recordFetchedBlock = {
            record in
            
