Corrected error in the export function.