Fixed button array convert to 2d MinMax not working