fix checkpoint counter