Fixed a bug when viewing an invoice.