Handle error in exporter.
Fixed some issues with export.