Error fixing for PDF