minor fixes to exporting, still broken i think