fix button state won't update when turn toggle state off