fix PDF download bug