fix the bug can't fold when use rainbow path