Hi,

What I see is you have forgotten to reset the A0 Button var. just before EACH Button Command ...

Generally it's a fatal error in such loops ...

Alain