fix atomic counters (part 2)