Fix bug of debouncing