Fix demo crash in landscape orientation