fix cartesian flip.