Fix crash on some devices when switching to Panorama

Change-Id: Iaf08dd586132413cf3a4af2ff416b1d29ffe9e65