Fix for rich text issue and too many invoices bug