fix figure counter