Some fixes to exporting. And set export to always visible for testing.