fixed problem with exporting with errors