Fix export to support large files.