Slightly improved flattening