Fix to pdf downloads