fixes bug (crash if dataset is unlabeled)