Better handling of flips/rotates