fix orientation errors