Fix generation counter on reset.