change safe for unsafe call at cross-validation