Toggle button or two-state toggle don't work on booleans?

I have a related issue. I want to individually toggle bits in an integer tag using 8 TWO-STATE TOGGLE buttons. So for each button I either AND the corresponding bit with a mask for STATE 1 or OR that bit for STATE 2. Then I use getbit() for the indicator.

For example, for the bit 0 button the:
STATE 1 Value expression is: {Tag} & 0xFFFE
STATE 2 Value expression is: {Tag} | 1
Indicator expression is: getbit ({Tag}, 0)
and so forth for all 8 buttons.

The result is that the tag value changes as expected if I toggle each one ON and then OFF but all 8 buttons change color when I do this and toggling any single button ON results in locking out other buttons. I guess the getbit() is not working just because it is executed at the same time as the write to the tag but Iā€™m still not understanding how the bit toggling can be accomplished without a script. I was able to do this easily in another SCADA that we used previously. Maybe someone can point me in the right direction. Thanks.