Fixed button click bug