PDF: two more crash fixes