fixed some problems with upgrading / undo&redo wrt data directories.