fix val_samples error