fix error on second run (when data dir exists)