Refinement on use of flattening