Added a protection against bad (wrt pedestal values) channels, and removed an inadequ...