Fixed index error for preferredLanguage