Flip coordinates correctly.