Fixed errors when cancelling import/export