Fix flatten + adaptive.