minor bugfix in the calibration generation code