Pal's xml fix for downloading invoices