Fix nullpo when devices rotate