fixed flatten_4 so it works with string values.