Fixed bug in pedestal calculation