Add two functions and fix a bug

Add functions: FoldSibling and FoldSiblingInverse 
Fix bug: check regions before doing selectRegions. This will avoid a error when region is empty and it is critical for vintageous or vintage user