flattenCell now works properly