where N is the number of modules (44 in the case of the CsI-array and 64 in the case of NaI-wall), xj the channel number of the j-th module and pj the pedestal value. The obtained peak was fitted using a Gaussian curve with an exponential tail. For each channel the necessary decrease or increase for the supply voltage was calculated and applied on demand. After about five iterations, a similar peak position for each channel was achieved, as well as an improved energy resolution.