Button fixes

minor change of the code for better responsiveness and debounce