graphics: fix flattening mode