         return subLayer
     }
     
+    private func removeImageLayer(image: UIImage?) {
+        DispatchQueue.main.async {
+            // avoid redundant layer when focus on faces for the image of cell specified in UITableView
+            self.imageLayer().removeFromSuperlayer()
+            self.image = image
+        }
+    }
+    
     private func sublayer() -> CALayer? {
         if let sublayers = layer.sublayers {
             for layer in sublayers {

    
    public func set(image: UIImage?, focusOnFaces: Bool) {
        guard focusOnFaces == true else {
            self.image = image
            return
        }
        setImageAndFocusOnFaces(image: image)

@IBDesignable
public extension UIImageView {
    
    private struct AssociatedCustomProperties {
        static var debugFaceAware: Bool = false
    }
    
    public var debugFaceAware: Bool {
        set {
            objc_setAssociatedObject(self, &AssociatedCustomProperties.debugFaceAware, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
        }
        get {
            guard let debug = objc_getAssociatedObject(self, &AssociatedCustomProperties.debugFaceAware) as? Bool else {
                return false
            }
            
            return debug
        }
    }
    
    @IBInspectable
    public var focusOnFaces: Bool {
        set {
