added fix to auto_orient