Fix bug in viewing invoices.