Fixing language detection