Improved debounce