fixes for export and import with no filename