Fix crash of Device Orientation