fixed bug in lang detection