fixed substep bug