Fixed export flag not being set