fixed stepindex bug