fixing the search language detection