                         self.avoidingView!.transform = CGAffineTransform.identity
                     }
                 }, completion: {(_ finished: Bool) -> Void in
-                    if !isChanging {
+                    if self.showingAnimationCount <= 0 {
                         self.updatedConstraints.removeAll()
                         self.updatedConstraintConstants.removeAll()
                     }

    private(set) static var isKeyboardVisible = false
    private static var avoidingViewUsesAutoLayout = false
    private static var triggerViews = [UIView]()
    private static var isChanging = false
    
    public static var buffer: CGFloat = 0.0
    public static var paddingForCurrentAvoidingView: CGFloat = 0.0

                            }
                            self.avoidingView!.superview!.setNeedsUpdateConstraints()
                        }
                        self.showingAnimationCount += 1
                        
                        UIView.animate(withDuration: TimeInterval(animationDuration), delay: TimeInterval(delay), options: UIViewAnimationOptions(rawValue: UInt(animationOptions)), animations: {() -> Void in
                            if self.avoidingViewUsesAutoLayout {
