fixed exporting bug