Fixed incorrect debounce function.