         }
         
         func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
-            if autoHidden == true && decelerate == false && hiddenTimeInterval == 0 {
-                timer(_hiddenTimeInterval)
+            if autoHidden == true && decelerate == false && hiddenTimer == nil {
+                timer(hiddenTimeInterval)
             }
         }
         

        
        private func resetTimerIfNeeded() {
            if autoHidden == true {
                timer(_hiddenTimeInterval)
            }
        }
    }

        func timer(_ interval: TimeInterval) {
            let handler: (CFRunLoopTimer?) -> Void = { [weak self] timer in
                self?.hiddenTimer = nil
                
                if self?.autoHidden == true {
                    if self?.panGesture.state != .changed && self?.scrollPanGesture?.state != .some(.changed) {
