fixes in event handling for button
Merge pull request #765 from nabinhait/hotfix

fixes in event handling for button