Fix typo when detecting $orientation = 2