payments and closing invoices and other bug fixes