Fixes on PDF engine so withs are appropriately detected