minor fix in button event