folding maze: bug fix*n+3

bug fix*n+3