Orientation bug fix