fixed logic of export and import