Fixing pdf error statement