diff --git a/src/@dseries/save.m b/src/@dseries/save.m
index 52c678b4288a5149fd9a142407e03ecd0fbc8c2e..8f4bb0fe6a628778528d3052f283d4a50e158e32 100644
--- a/src/@dseries/save.m
+++ b/src/@dseries/save.m
@@ -36,7 +36,7 @@ switch format
     fid = fopen([basename, '.m'],'w');
     fprintf(fid,'%% File created on %s.\n',datestr(now));
     fprintf(fid,'\n');
-    fprintf(fid,'FREQ__ = %s;\n',num2str(frequency(o)));
+    fprintf(fid,'FREQ__ = %u;\n', frequency(o));
     fprintf(fid,'INIT__ = ''%s'';\n',date2string(firstdate(o)));
     fprintf(fid,'\n');
     fprintf(fid,'NAMES__ = {');
@@ -74,13 +74,13 @@ switch format
         tagnames = fieldnames(o.tags);
         fprintf(fid, 'TAGS__ = struct();\n');
         for i=1:length(tagnames)
-            fprintf(fid, 'TAGS__.%s = cell(%s, 1);\n', tagnames{i}, num2str(vobs(o)));
+            fprintf(fid, 'TAGS__.%s = cell(%u, 1);\n', tagnames{i}, vobs(o));
             for j=1:vobs(o)
                 if ~isempty(o.tags.(tagnames{i}){j})
                     if ischar(o.tags.(tagnames{i}){j})
-                        fprintf(fid, 'TAGS__.%s(%s) = {''%s''};\n', tagnames{i}, num2str(j), o.tags.(tagnames{i}){j});
+                        fprintf(fid, 'TAGS__.%s(%u) = {''%s''};\n', tagnames{i}, j, o.tags.(tagnames{i}){j});
                     elseif isnumeric(o.tags.(tagnames{i}){j}) && iscalar(o.tags.(tagnames{i}){j})
-                        fprintf(fid, 'TAGS__.%s(%s) = {%s};\n', tagnames{i}, num2str(j), o.tags.(tagnames{i}){j});
+                        fprintf(fid, 'TAGS__.%s(%u) = {%s};\n', tagnames{i}, j, o.tags.(tagnames{i}){j});
                     else
                         error('dseries::tags: Cannot save this type of tag!')
                     end
@@ -105,7 +105,7 @@ switch format
     TAGS__ = o.tags;
     str = [];
     for v = 1:vobs(o)
-        str = sprintf('%s %s = o.data(:,%s);', str, o.name{v}, num2str(v));
+        str = sprintf('%s %s = o.data(:,%u);', str, o.name{v}, v);
     end
     eval(str);
     currentdirectorycontent = dir();