Bugfix for button click events