fix depth-first ivy for 1xn mazes