I solved the problem with a constant button set, and redefines in loops.