fixed the handling of multiple trials for the creation of label