fix language detection