Set maximum folding depth