corrected generation of mainLabelNo