Fix display rotation crash due to a xml error