added code to autodetect the language and discard if mistakes between detected language and requested language.