Fix release 3.1

Fix:
SetBtnFlag
ClearBtnFlag