minor fixes for PDF export feature