Bugs fixed in the flat walk planner