             }
         } else if indexPath.section == 1 {
             let asset = recentPhotos[indexPath.row]
-            manager.requestImageForAsset(asset, targetSize: PHImageManagerMaximumSize, contentMode: .AspectFit, options: nil) { (result, _) in
+            cachingImageManager.requestImageForAsset(asset, targetSize: targetImageSize, contentMode: .AspectFit, options: nil) { (result, _) in
                 self.delegate?.didSelectImage(result)
             }
         }

        } else if indexPath.section == 1 {
            var cell = collectionView.dequeueReusableCellWithReuseIdentifier(PhotoCell.reuseIdentifier, forIndexPath: indexPath) as! PhotoCell
            if cell.tag != 0 {
                manager.cancelImageRequest(PHImageRequestID(cell.tag))
            }
            cell.tag = Int(manager.requestImageForAsset(recentPhotos[indexPath.row], targetSize: ImagePickerViewController.targetSize, contentMode: .AspectFit, options: nil) { (result, _) in
                cell.image = result
            })
            return cell

    private static let expectedCellWidth: CGFloat = 240
    private static let targetSize = CGSize(width: expectedCellWidth, height: pickerHeight)
    private static let borderWidth: CGFloat = 1
    private static let defaultFetchOptions: PHFetchOptions = {
        let opts = PHFetchOptions()
        opts.sortDescriptors = [ NSSortDescriptor(key: "creationDate", ascending: false) ]
        return opts
    }()
    
    private let photoSession = AVCaptureSession()
    private let stillImageOutput = AVCaptureStillImageOutput()
    private let cachingImageManager = PHCachingImageManager()
    private var captureLayer: AVCaptureVideoPreviewLayer!
    private let q = dispatch_queue_create("camera_load_q", DISPATCH_QUEUE_SERIAL)
    
    private let window = UIApplication.sharedApplication().keyWindow!
    
    public var delegate: ImagePickerDelegate?
    
