[WO-341] Make sure that there is no infinite loop when folding
Merge pull request #2 from whiteout-io/dev/wo-341

[WO-341] Make sure that there is no infinite loop when folding