fixed PDF integrity check