Fixed export script