diff --git a/+PlotID/Publish.m b/+PlotID/Publish.m
index 231c185ab862f4e32daa5c97a263f1a49a5c1e02..0c93f0bccea2f732ac8269ad57f0530428b3fcce 100644
--- a/+PlotID/Publish.m
+++ b/+PlotID/Publish.m
@@ -38,13 +38,17 @@ if ~iscell(DataPaths)
       DataPaths = {DataPaths}; %Cell array
 end
 
+% strings will cause problems, we therfore use chars
 for i=1:numel(DataPaths)
     if isstring(DataPaths{i})
-       % strings will cause problems 
        DataPaths{i} = char(DataPaths{i});
     end
 end
 
+if isstring(scriptPath)
+   scriptPath = char(scriptPath);
+end
+
 %catch multiple figures in fig
 if numel(figure) > 1
     figure = figure(1);