fixed language selection handling