Fixed a bug in the walking mechanism.