Fix initialization of nextState.