Fix a bug in language switcher