fixed issue with double click of buttons