Fixed active language detection