button click bug fix