Fixed creating invoices