fix some pdf errors