Fix incrementing counter.