OC-1508: App crashes when changing the orientation