if for any reason we get into a bigger step than max, I just put max as the default value for both. The only problem I can foresee is we get into this situation, AND the last step requires sim AND we skip it back. Then current step may get 0 value. But I see that as a less than remote chance. 
Maybe do you see other possibilities?