fixed min/max on ardcode