folding maze: bug fix*n

bug fix*n