Added debouncing on button release