fixed folding recursive constraints