Increment sequence at the right timing
Eliminate compile warning