fixed bug in export and batch programs