fix error when $pdf_path not set