fixed language detection