fixes language detection when there are mixing of more then one language