Fix invoices for contact id bug