Misc fixed for corrupted PDFs