fix bugs of exporting