fix exporting unsaved documents