Support steps in the backward direction.

Thanks to @mcapelle and @cexbrayat.