Fix geometry issue when orientations change