Correct indexing the vector out of range when the size is zero.
Merge branch 'nex5000-timesteps'