     public func invalidateAndCancel() {
         self.performBlock {
             self.imageLoader.delegate = nil
-            self.cancelTasks(Array(self.executingTasks))
+            self.cancelTasks(self.executingTasks)
             self.preheatingTasks.removeAll()
             self.configuration.dataLoader.invalidate()
             self.invalidated = true

    private func executePreheatingTasksIfNeeded() {
        self.needsToExecutePreheatingTasks = false
        var executingTaskCount = self.executingTasks.count
        let sortedPreheatingTasks = self.preheatingTasks.values.sort { $0.tag < $1.tag }
        for task in sortedPreheatingTasks {
            if executingTaskCount > self.configuration.maxConcurrentPreheatingTaskCount {
                break
            }

        self.performBlock {
            self.cancelTasks(requests.flatMap {
                return self.preheatingTasks[self.imageLoader.preheatingKeyForRequest($0)]
            })
        }
    }
    
    public func stopPreheatingImages() {
        self.performBlock {
            self.cancelTasks(self.preheatingTasks.values)
        }
    }
    
