fix invoices counters