Fix CSV and PDF exports