Handle orientations correctly.