fix figure counters with subfigures