fix invalid step index
Merge pull request #54 from havvg/fix-invalid-steps

fix invalid step index