diff --git a/@netcdf_native/write.m b/@netcdf_native/write.m
index e723d8cc17e5b378ede94a0dd150e389dda83ceb..cb25e932e5fdc3ec197d4846c8f80926cfb14e0d 100644
--- a/@netcdf_native/write.m
+++ b/@netcdf_native/write.m
@@ -360,8 +360,10 @@ for i=1:numel(ncv_keys)
       value = int32(s.data__);
     case {'short', 'int16'}
       value = int16(s.data__);
-    case {'byte', 'int8'}
+    case {'int8'}
       value = int8(s.data__);
+    case {'byte', 'uint8'}
+      value = uint8(s.data__);
     case 'char'
       value = char(s.data__);
   end
@@ -418,4 +420,4 @@ t = toc; fprintf('...done (%6.2f sec).\n\n',t);
 % -----------------
 netcdf.close(self.nc_id)
 
-end % end of write function
\ No newline at end of file
+end % end of write function